
<!DOCTYPE HTML>
<html lang="en" >
    <head>
        <meta charset="UTF-8">
        <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
        <title>2.2.1 基本类型 · 命令进阶</title>
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
        <meta name="description" content="">
        <meta name="generator" content="GitBook 3.2.2">
        
        
        
    
    <link rel="stylesheet" href="../../gitbook/style.css">

    
            
                
                <link rel="stylesheet" href="../../gitbook/gitbook-plugin-expandable-chapters/expandable-chapters.css">
                
            
                
                <link rel="stylesheet" href="../../gitbook/gitbook-plugin-highlight/website.css">
                
            
                
                <link rel="stylesheet" href="../../gitbook/gitbook-plugin-search/search.css">
                
            
                
                <link rel="stylesheet" href="../../gitbook/gitbook-plugin-fontsettings/website.css">
                
            
        

    

    
        
        <link rel="stylesheet" href="../../styles/website.css">
        
    
        
    
        
    
        
    
        
    
        
    

        
    
    
    <meta name="HandheldFriendly" content="true"/>
    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <link rel="apple-touch-icon-precomposed" sizes="152x152" href="../../gitbook/images/apple-touch-icon-precomposed-152.png">
    <link rel="shortcut icon" href="../../gitbook/images/favicon.ico" type="image/x-icon">

    
    <link rel="next" href="example.html" />
    
    
    <link rel="prev" href="nbt.html" />
    

    </head>
    <body>
        
<div class="book">
    <div class="book-summary">
        
            
<div id="book-search-input" role="search">
    <input type="text" placeholder="Type to search" />
</div>

            
                <nav role="navigation">
                


<ul class="summary">
    
    

    

    
        
        
    
        <li class="chapter " data-level="1.1" data-path="../../">
            
                <a href="../../">
            
                    
                    引言
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2" data-path="../../concepts/concepts.html">
            
                <a href="../../concepts/concepts.html">
            
                    
                    1 基础概念
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.2.1" data-path="../../concepts/space.html">
            
                <a href="../../concepts/space.html">
            
                    
                    1.1 坐标、朝向、区块
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.2" data-path="../../concepts/time.html">
            
                <a href="../../concepts/time.html">
            
                    
                    1.2 时间、顺序
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.3" data-path="../../concepts/execution.html">
            
                <a href="../../concepts/execution.html">
            
                    
                    1.3 命令执行
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.4" data-path="../../concepts/selector/selector.html">
            
                <a href="../../concepts/selector/selector.html">
            
                    
                    1.4 目标选择器
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.5" data-path="../../concepts/stats.html">
            
                <a href="../../concepts/stats.html">
            
                    
                    1.5 命令执行统计
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.3" data-path="../common-format.html">
            
                <a href="../common-format.html">
            
                    
                    2 常用命令格式
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.3.1" data-path="../json/json.html">
            
                <a href="../json/json.html">
            
                    
                    2.1 JSON文本
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.3.1.1" data-path="../json/type.html">
            
                <a href="../json/type.html">
            
                    
                    2.1.1 JSON文本类型
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.1.2" data-path="../json/formatting.html">
            
                <a href="../json/formatting.html">
            
                    
                    2.1.2 JSON样式
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.1.3" data-path="../json/event.html">
            
                <a href="../json/event.html">
            
                    
                    2.1.3 JSON事件
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.1.4" data-path="../json/array.html">
            
                <a href="../json/array.html">
            
                    
                    2.1.4 JSON分项
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.1.5" data-path="../json/sign-book.html">
            
                <a href="../json/sign-book.html">
            
                    
                    2.1.5 告示牌及成书
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.1.6" data-path="../json/other.html">
            
                <a href="../json/other.html">
            
                    
                    2.1.6 杂项
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.1.7" data-path="../json/keys.html">
            
                <a href="../json/keys.html">
            
                    
                    2.1.A 附录: keybind列表
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.3.2" data-path="nbt.html">
            
                <a href="nbt.html">
            
                    
                    2.2 NBT及结构
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter active" data-level="1.3.2.1" data-path="simple.html">
            
                <a href="simple.html">
            
                    
                    2.2.1 基本类型
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.2.2" data-path="example.html">
            
                <a href="example.html">
            
                    
                    2.2.2 NBT实战
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.4" data-path="../../command/command.html">
            
                <a href="../../command/command.html">
            
                    
                    3 如何执行命令
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.4.1" data-path="../../command/chat.html">
            
                <a href="../../command/chat.html">
            
                    
                    3.1 聊天栏
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.2" data-path="../../command/cb.html">
            
                <a href="../../command/cb.html">
            
                    
                    3.2 命令方块简介
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.3" data-path="../../command/function.html">
            
                <a href="../../command/function.html">
            
                    
                    3.3 命令函数
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.5" data-path="../../scoreboard/scoreboard.html">
            
                <a href="../../scoreboard/scoreboard.html">
            
                    
                    4 记分板
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.5.1" data-path="../../scoreboard/objective.html">
            
                <a href="../../scoreboard/objective.html">
            
                    
                    4.1 记分板变量
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.2" data-path="../../scoreboard/team.html">
            
                <a href="../../scoreboard/team.html">
            
                    
                    4.2 记分板队伍
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.3" data-path="../../scoreboard/tag.html">
            
                <a href="../../scoreboard/tag.html">
            
                    
                    4.3 记分板标签
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.4" data-path="../../scoreboard/command.html">
            
                <a href="../../scoreboard/command.html">
            
                    
                    4.4 记分板命令
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.5" data-path="../../scoreboard/example.html">
            
                <a href="../../scoreboard/example.html">
            
                    
                    4.5 记分板实战
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.5.5.1" data-path="../../scoreboard/examples/example1.html">
            
                <a href="../../scoreboard/examples/example1.html">
            
                    
                    4.5.1 循环电路|记分板的基础操作
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.5.2" data-path="../../scoreboard/examples/example2.html">
            
                <a href="../../scoreboard/examples/example2.html">
            
                    
                    4.5.2 自定义命令|stats与记分板
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.5.3" data-path="../../scoreboard/examples/example3.html">
            
                <a href="../../scoreboard/examples/example3.html">
            
                    
                    4.5.3 击杀率|operation与准则
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.5.4" data-path="../../scoreboard/examples/example4.html">
            
                <a href="../../scoreboard/examples/example4.html">
            
                    
                    4.5.4 漂亮的排名|显示与队伍
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.5.5" data-path="../../scoreboard/examples/example5.html">
            
                <a href="../../scoreboard/examples/example5.html">
            
                    
                    4.5.5 简单登入系统|function与综合运用
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.6" data-path="../../logic/logic.html">
            
                <a href="../../logic/logic.html">
            
                    
                    5 基础逻辑
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.6.1" data-path="../../logic/enum.html">
            
                <a href="../../logic/enum.html">
            
                    
                    5.1 穷举
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.2" data-path="../../logic/score.html">
            
                <a href="../../logic/score.html">
            
                    
                    5.2 分数处理
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.3" data-path="../../logic/bool.html">
            
                <a href="../../logic/bool.html">
            
                    
                    5.3 布尔逻辑
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.4" data-path="../../logic/loop.html">
            
                <a href="../../logic/loop.html">
            
                    
                    5.4 循环
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.5" data-path="../../logic/event.html">
            
                <a href="../../logic/event.html">
            
                    
                    5.5 事件
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.6" data-path="../../logic/marker.html">
            
                <a href="../../logic/marker.html">
            
                    
                    5.6 实体Marker
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.7" data-path="../../logic/execute.html">
            
                <a href="../../logic/execute.html">
            
                    
                     5.7 execute进阶
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.7" data-path="../../practise/practise.html">
            
                <a href="../../practise/practise.html">
            
                    
                    6 实战
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.7.1" data-path="../../practise/objects.html">
            
                <a href="../../practise/objects.html">
            
                    
                    6.1 游戏内物件
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.2" data-path="../../practise/test-debug.html">
            
                <a href="../../practise/test-debug.html">
            
                    
                    6.2 命令系统测试及调试
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.3" data-path="../../practise/examples/examples.html">
            
                <a href="../../practise/examples/examples.html">
            
                    
                    6.3 更多命令系统例子
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.7.3.1" data-path="../../practise/examples/furnace.html">
            
                <a href="../../practise/examples/furnace.html">
            
                    
                    6.3.1 熔炉过热系统
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.3.2" data-path="../../practise/examples/badapple.html">
            
                <a href="../../practise/examples/badapple.html">
            
                    
                    6.3.2 毒苹果
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.3.3" data-path="../../practise/examples/rain.html">
            
                <a href="../../practise/examples/rain.html">
            
                    
                    6.3.3 下雨检测
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.3.4" data-path="../../practise/examples/chest_replace.html">
            
                <a href="../../practise/examples/chest_replace.html">
            
                    
                    6.3.4 替换方块实体
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.3.5" data-path="../../practise/examples/skill.html">
            
                <a href="../../practise/examples/skill.html">
            
                    
                    6.3.5 技能系统
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.3.6" data-path="../../practise/examples/crown.html">
            
                <a href="../../practise/examples/crown.html">
            
                    
                    6.3.6 皇冠系统
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.3.7" data-path="../../practise/examples/blackhole.html">
            
                <a href="../../practise/examples/blackhole.html">
            
                    
                    6.3.7 黑洞
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.3.8" data-path="../../practise/examples/login.html">
            
                <a href="../../practise/examples/login.html">
            
                    
                    6.3.8 登录系统
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.8" data-path="../../data-files/data-files.html">
            
                <a href="../../data-files/data-files.html">
            
                    
                    7 游戏文件的使用
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.8.1" data-path="../../data-files/resourcepack/resourcepack.html">
            
                <a href="../../data-files/resourcepack/resourcepack.html">
            
                    
                    7.1 资源包
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.8.1.1" data-path="../../data-files/resourcepack/textures.html">
            
                <a href="../../data-files/resourcepack/textures.html">
            
                    
                    7.1.1 材质
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.8.1.2" data-path="../../data-files/resourcepack/models.html">
            
                <a href="../../data-files/resourcepack/models.html">
            
                    
                    7.1.2 模型
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.8.1.3" data-path="../../data-files/resourcepack/sound.html">
            
                <a href="../../data-files/resourcepack/sound.html">
            
                    
                    7.1.3 声音
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.8.2" data-path="../../data-files/loot-table.html">
            
                <a href="../../data-files/loot-table.html">
            
                    
                    7.2 Loot table
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.8.3" data-path="../../data-files/advancements/advancements.html">
            
                <a href="../../data-files/advancements/advancements.html">
            
                    
                    7.3 Advancement
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.8.3.1" data-path="../../data-files/advancements/examples.html">
            
                <a href="../../data-files/advancements/examples.html">
            
                    
                    Advancement例子
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.9" >
            
                <span>
            
                    
                    8 杂项
            
                </span>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.9.1" >
            
                <a target="_blank" href="https://commandtutorials.neocities.org/">
            
                    
                    8.1 其他资源
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.9.2" data-path="../../misc/success.html">
            
                <a href="../../misc/success.html">
            
                    
                    8.2 如何成为一个成功的CBer
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.9.3" data-path="../../misc/question.html">
            
                <a href="../../misc/question.html">
            
                    
                    8.3 问问题的技巧
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.9.4" data-path="../../misc/quotes.html">
            
                <a href="../../misc/quotes.html">
            
                    
                    8.4 其他CBer的建言
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    

    

    <li class="divider"></li>

    <li>
        <a href="https://www.gitbook.com" target="blank" class="gitbook-link">
            Published with GitBook
        </a>
    </li>
</ul>


                </nav>
            
        
    </div>

    <div class="book-body">
        
            <div class="body-inner">
                
                    

<div class="book-header" role="navigation">
    

    <!-- Title -->
    <h1>
        <i class="fa fa-circle-o-notch fa-spin"></i>
        <a href="../.." >2.2.1 基本类型</a>
    </h1>
</div>




                    <div class="page-wrapper" tabindex="-1" role="main">
                        <div class="page-inner">
                            
<div id="book-search-results">
    <div class="search-noresults">
    
                                <section class="normal markdown-section">
                                
                                <h1 id="&#x57FA;&#x672C;&#x7C7B;&#x578B;">&#x57FA;&#x672C;&#x7C7B;&#x578B;</h1>
<h2 id="&#x6570;&#x5B57;&#x7C7B;&#x578B;">&#x6570;&#x5B57;&#x7C7B;&#x578B;</h2>
<p>NBT&#x628A;&#x6570;&#x5B57;&#x5206;&#x4E3A;&#x4E24;&#x5927;&#x79CD;&#xFF0C;&#x5206;&#x522B;&#x4E3A;&#x6574;&#x6570;&#x53CA;&#x6D6E;&#x70B9;&#x6570;&#xFF0C;&#x7136;&#x540E;&#x518D;&#x7EC6;&#x5206;&#x4E3A;&#x4E0D;&#x540C;&#x50A8;&#x5B58;&#x5927;&#x5C0F;&#x3001;&#x7CBE;&#x5EA6;&#x7684;&#x79CD;&#x7C7B;&#x3002;</p>
<ul>
<li>&#x6574;&#x6570;<ul>
<li>Byte &#xFF08;&#x6570;&#x503C;&#x8303;&#x56F4;&#x4E3A; -128 &#x5230; 127 &#xFF09;</li>
<li>Short &#xFF08;&#x6570;&#x503C;&#x8303;&#x56F4;&#x4E3A; -32,768 &#x5230; 32,767 )</li>
<li>Int &#xFF08;&#x6570;&#x503C;&#x8303;&#x56F4;&#x4E3A; -2,147,483,648 &#x5230; 2,147,483,647&#xFF09;</li>
<li>Long (&#x6570;&#x503C;&#x8303;&#x56F4;&#x4E3A; -9,223,372,036,854,775,808 &#x5230; 9,223,372,036,854,775,807)</li>
</ul>
</li>
<li>&#x6D6E;&#x70B9;&#x6570;&#xFF08;&#x7C7B;&#x4F3C;&#x79D1;&#x5B66;&#x8BA1;&#x6570;&#x6CD5;&#xFF0C;&#x80FD;&#x50A8;&#x5B58;&#x5C0F;&#x6570;&#x53CA;&#x5F88;&#x5927;&#x7684;&#x6570;&#x503C;&#xFF0C;&#x7136;&#x800C;&#x7CBE;&#x5EA6;&#x6709;&#x9650;&#xFF0C;&#x6570;&#x503C;&#x8D8A;&#x5C0F;&#x7CBE;&#x5EA6;&#x8D8A;&#x9AD8;&#xFF0C;&#x53CD;&#x4E4B;&#x4EA6;&#x7136;&#xFF09;<ul>
<li>Float &#xFF08;&#x7CBE;&#x5EA6;&#x8F83;&#x4F4E;&#xFF09;</li>
<li>Double &#xFF08;&#x7CBE;&#x5EA6;&#x8F83;&#x9AD8;&#xFF09;</li>
</ul>
</li>
</ul>
<h3 id="&#x6574;&#x6570;&#x683C;&#x5F0F;">&#x6574;&#x6570;&#x683C;&#x5F0F;</h3>
<pre><code>&lt;&#x6570;&#x503C;&gt;&lt;&#x540E;&#x7F00;&gt;
</code></pre><p>&#x6570;&#x503C;&#x90E8;&#x5206;&#x5FC5;&#x987B;&#x4E3A;&#x7EAF;&#x6570;&#x5B57;&#x6216;&#x7EAF;&#x6570;&#x5B57;&#x4E14;&#x524D;&#x65B9;&#x6709;&#x4E2A;<code>+</code>/<code>-</code>&#x53F7;&#x3002;<br>&#x7EAF;&#x6570;&#x5B57;&#x4E0D;&#x80FD;&#x4EE5;0&#x5F00;&#x5934;&#xFF0C;&#x4E5F;&#x5C31;&#x662F;&#x4E0D;&#x80FD;&#x6709;&#x524D;&#x5BFC;&#x96F6;(Leading zeros)&#xFF0C;&#x9664;&#x975E;&#x90A3;&#x4E2A;&#x6570;&#x5B57;&#x5C31;&#x662F;0&#x3002;</p>
<table>
<thead>
<tr>
<th>&#x7C7B;&#x578B;</th>
<th>&#x540E;&#x7F00;&#xFF08;&#x5927;&#x5C0F;&#x5199;&#x7686;&#x53EF;&#xFF09;</th>
</tr>
</thead>
<tbody>
<tr>
<td>Byte</td>
<td>b</td>
</tr>
<tr>
<td>Short</td>
<td>s</td>
</tr>
<tr>
<td>Int</td>
<td>&#x65E0;&#x540E;&#x7F00;</td>
</tr>
<tr>
<td>Long</td>
<td>l</td>
</tr>
</tbody>
</table>
<p>&#x4F8B;&#x5B50;: (&#x524D;&#x65B9;&#x4E3A;+&#x7684;&#x5C31;&#x662F;&#x6B63;&#x786E;&#xFF0C;-&#x7684;&#x5C31;&#x662F;&#x9519;&#x8BEF;)</p>
<pre><code>+ 123b
+ 123B
+ 123
+ -123b
+ 0
+ +0
+ -0

- 0123b
&#xFF08;&#x524D;&#x5BFC;&#x96F6;&#xFF09;
- 00
&#xFF08;&#x524D;&#x5BFC;&#x96F6;&#xFF09;
- +-123
&#xFF08;&#x53EA;&#x80FD;&#x51FA;&#x73B0;&#x4E00;&#x4E2A;`+`/`-`&#x53F7;&#xFF09;
- 1e3
&#xFF08;&#x4E0D;&#x652F;&#x6301;&#x79D1;&#x5B66;&#x8BB0;&#x6570;&#x6CD5;&#xFF09;
- 133b
&#xFF08;&#x8D85;&#x51FA;&#x8303;&#x56F4;&#xFF09;
</code></pre><blockquote>
<p>&#x547D;&#x4EE4;NBT&#x66F4;&#x6539;NBT&#x65F6;&#x80FD;&#x591F;&#x505A;&#x81EA;&#x52A8;&#x7C7B;&#x578B;&#x53D8;&#x6362;&#xFF0C;&#x53EA;&#x8981;&#x6570;&#x503C;&#x6CA1;&#x6709;&#x8D85;&#x51FA;&#x8303;&#x56F4;&#x5C31;&#x53EF;&#x4EE5;<br>&#x7136;&#x800C;&#x5EFA;&#x8BAE;&#x5168;&#x90E8;&#x90FD;&#x5199;&#x4E0A;&#x7C7B;&#x578B;&#x540E;&#x7F00;&#xFF0C;&#x56E0;&#x4E3A;&#x7C7B;&#x578B;&#x53D8;&#x6362;&#x6709;&#x65F6;&#x5019;&#x53EF;&#x80FD;&#x4F1A;&#x51FA;&#x95EE;&#x9898;&#xFF0C;&#x800C;&#x4E14;&#x68C0;&#x6D4B;&#x7684;&#x65F6;&#x5019;&#x4E5F;&#x5FC5;&#x987B;&#x52A0;&#x4E0A;&#x7C7B;&#x578B;&#x540E;&#x7F00;</p>
</blockquote>
<h4 id="&#x5E03;&#x5C14;&#x503C;">&#x5E03;&#x5C14;&#x503C;</h4>
<p>&#x5E03;&#x5C14;&#x503C;&#x662F;&#x6574;&#x6570;&#x683C;&#x5F0F;&#x7684;&#x4E00;&#x4E2A;&#x7279;&#x6B8A;&#x60C5;&#x51B5;&#xFF0C;&#x53EA;&#x50A8;&#x5B58;1 (True)&#x53CA; 0 (False)&#x503C;&#x3002;<br>&#x5E03;&#x5C14;&#x503C;&#x4F7F;&#x7528; Byte&#x50A8;&#x5B58;&#xFF0C;&#x6BD4;&#x5982;&#x662F; <code>NoAI:1b</code>&#x3001;<code>IsBaby:0b</code>&#x8FD9;&#x7C7B;&#x3002;<br>&#x7531;&#x4E8E;&#x5176;&#x5B9E;&#x6839;&#x672C;&#x5C31;&#x662F;byte&#xFF0C;&#x6240;&#x4EE5;&#x4E00;&#x822C;&#x4E5F;&#x4E0D;&#x4F1A;&#x7279;&#x522B;&#x4ECB;&#x7ECD;&#x3002;</p>
<h3 id="&#x6D6E;&#x70B9;&#x6570;&#x683C;&#x5F0F;">&#x6D6E;&#x70B9;&#x6570;&#x683C;&#x5F0F;</h3>
<pre><code>&lt;&#x6570;&#x503C;&gt;&lt;&#x540E;&#x7F00;&gt;
</code></pre><p>&#x6570;&#x503C;&#x90E8;&#x5206;&#x53EF;&#x4EE5;&#x662F;</p>
<ul>
<li>&#x6574;&#x6570;&#xFF0C;&#x53EF;&#x4EE5;&#x6709;&#x524D;&#x5BFC;&#x96F6;</li>
<li>&#x5C0F;&#x6570;&#xFF0C;&#x53EF;&#x4EE5;&#x6709;&#x524D;&#x5BFC;&#x96F6;</li>
<li>&#x79D1;&#x5B66;&#x8BB0;&#x6570;&#x6CD5;&#xFF0C;&#x5982;<code>1.23e123</code>&#x6216;<code>1.23e-123</code>
&#x683C;&#x5F0F;&#x5C31;&#x662F;<code>&lt;&#x6570;&#x503C;1&gt;e&lt;&#x6570;&#x503C;2&gt;</code>&#xFF0C;&#x6570;&#x503C;&#x5C31;&#x662F;<code>&lt;&#x6570;&#x503C;1&gt;*10^&lt;&#x6570;&#x503C;2&gt;</code></li>
</ul>
<table>
<thead>
<tr>
<th>&#x7C7B;&#x578B;</th>
<th>&#x540E;&#x7F00;&#xFF08;&#x5927;&#x5C0F;&#x5199;&#x7686;&#x53EF;&#xFF09;</th>
</tr>
</thead>
<tbody>
<tr>
<td>Float</td>
<td>f</td>
</tr>
<tr>
<td>Double</td>
<td>d</td>
</tr>
</tbody>
</table>
<p>&#x4F8B;&#x5B50;</p>
<pre><code>123f
123d
1.23e2f
1.23e2d
-1.23e-2d
1.23e-2d
</code></pre><blockquote>
<p>&#x6CE8;&#x610F;&#xFF0C;&#x6D6E;&#x70B9;&#x6570;&#x7684;&#x6570;&#x503C;&#x4E0D;&#x592A;&#x51C6;&#x786E;&#xFF0C;&#x4E00;&#x822C;&#x5230;4&#x4E2A;&#x4F4D;&#x5C31;&#x5DEE;&#x4E0D;&#x591A;&#x4E86;<br>&#x522B;&#x8BD5;&#x56FE;&#x68C0;&#x67E5;&#x6D6E;&#x70B9;&#x6570;&#x7684;NBT&#x4E86;...<strong>&#x68C0;&#x67E5;&#x4E0D;&#x4E86;</strong> &#x7684;</p>
</blockquote>
<h2 id="&#x5B57;&#x4E32;&#x7C7B;&#x578B;">&#x5B57;&#x4E32;&#x7C7B;&#x578B;</h2>
<p>&#x5B57;&#x4E32;(String)&#x7C7B;&#x578B;&#xFF0C;&#x987E;&#x540D;&#x601D;&#x4E49;&#x5C31;&#x662F;&#x50A8;&#x5B58;&#x5B57;&#x4E32;&#xFF08;&#x6587;&#x5B57;&#xFF09;&#x7684;&#x7C7B;&#x578B;&#x3002;</p>
<p>&#x6570;&#x636E;&#x5E76;&#x4E0D;&#x603B;&#x5168;&#x662F;&#x6570;&#x5B57;&#xFF0C;&#x6BD4;&#x5982;&#x7269;&#x54C1;&#x7684;&#x540D;&#x79F0;&#x3002;&#x4E3A;&#x4E86;&#x65B9;&#x4FBF;&#x4F7F;&#x7528;&#xFF0C;NBT&#x91CC;&#x6709;&#x5B57;&#x7B26;&#x7C7B;&#x578B;&#x53EF;&#x4EE5;&#x50A8;&#x5B58;&#x5B57;&#x7B26;&#x3002;</p>
<p>&#x683C;&#x5F0F;&#xFF1A;</p>
<pre><code>&#x5B57;&#x7B26;
&#x6216;
&quot;&#x5B57;&#x7B26;&quot;
</code></pre><p>&#x5F53;&#x5B57;&#x7B26;&#x51FA;&#x73B0;&#x4E86;&#x4E0D;&#x5C5E;&#x4E8E;<code>a-z A-Z 0-9 _ .</code>&#xFF08;&#x7A7A;&#x683C;&#x3001;&#x4E2D;&#x6587;&#x5B57;&#x7B26;&#x4E5F;&#x662F;&#x4E0D;&#x5C5E;&#x4E8E;&#x8FD9;&#x4E9B;&#x5B57;&#x7B26;&#xFF09;&#x91CC;&#x7684;&#x5B57;&#x7B26;&#xFF0C;&#x5C31;&#x9700;&#x8981;&#x4F7F;&#x7528;&#x7B2C;&#x4E8C;&#x4E2A;&#x683C;&#x5F0F;&#xFF0C;&#x4E5F;&#x5C31;&#x662F;&#x4EE5;<code>&quot;&quot;</code>&#x62EC;&#x4F4F;&#xFF0C;&#x8868;&#x793A;&#x8FD9;&#x662F;&#x4E00;&#x4E2A;&#x5B8C;&#x6574;&#x7684;&#x5B57;&#x4E32;&#x3002;<br>&#x6216;&#x8005;&#x5F53;&#x8BE5;&#x5B57;&#x7B26;&#x53EF;&#x80FD;&#x88AB;&#x5F53;&#x4F5C;&#x662F;&#x5176;&#x4ED6;&#x7C7B;&#x578B;&#x7684;&#x65F6;&#x5019;&#xFF08;&#x5982;&#x7EAF;&#x6570;&#x5B57;&#x6216;&#x6570;&#x5B57;&#x7ED3;&#x5C3E;&#x4E3A;<code>bsldf</code>&#x7B49;&#x5B57;&#x7B26;&#xFF08;&#x5927;&#x5C0F;&#x5199;&#x7686;&#x53EF;&#xFF09;&#xFF09;&#xFF0C;&#x4E5F;&#x9700;&#x8981;&#x4F7F;&#x7528;&#x7B2C;&#x4E8C;&#x4E2A;&#x683C;&#x5F0F;&#x3002;</p>
<p>&#x5982;&#x540C;Compound&#x5B50;&#x6807;&#x7B7E;&#x7684;&#x540D;&#x5B57;&#x4E00;&#x6837;&#xFF08;Compound&#x5B50;&#x6807;&#x7B7E;&#x7684;&#x540D;&#x5B57;&#x5176;&#x5B9E;&#x5C31;&#x662F;&#x4E00;&#x4E2A;&#x5B57;&#x4E32;&#x7C7B;&#x578B;&#xFF09;&#xFF0C;&#x5F53;&#x5B57;&#x4E32;&#x91CC;&#x51FA;&#x73B0;&#x4E86;<code>\</code>&#x6216;<code>&quot;</code>&#x5B57;&#x7B26;&#x65F6;&#x5C31;&#x9700;&#x8981;&#x5C06;&#x8FD9;&#x4E24;&#x4E2A;&#x5B57;&#x7B26;&#x8FDB;&#x884C;&#x8F6C;&#x4E49;&#xFF0C;&#x65B9;&#x5F0F;&#x4E3A;&#x5728;&#x5B57;&#x7B26;&#x524D;&#x65B9;&#x52A0;&#x4E0A;<code>\</code>&#x53F7;&#x3002;&#x8F6C;&#x4E49;&#x65B9;&#x5F0F;&#x53EF;&#x4EE5;&#x53C2;&#x89C1;&#x4E4B;&#x524D;JSON&#x7684;&#x4ECB;&#x7ECD;&#xFF0C;&#x5927;&#x81F4;&#x4E00;&#x6837;&#x3002;</p>
<p>&#x4F8B;&#x5B50;:</p>
<table>
<thead>
<tr>
<th>NBT&#x8868;&#x793A;</th>
<th>&#x5B9E;&#x9645;&#x663E;&#x793A;</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>abcd</code></td>
<td>abcd</td>
</tr>
<tr>
<td><code>&quot;abcd&quot;</code></td>
<td>abcd</td>
</tr>
<tr>
<td><code>&quot;123&quot;</code></td>
<td>123</td>
</tr>
<tr>
<td><code>123</code></td>
<td><strong>&#x8FD9;&#x4E2A;&#x4E0D;&#x662F;&#x5B57;&#x7B26;&#x4E32;</strong></td>
</tr>
<tr>
<td><code>&quot;ab cd&quot;</code></td>
<td>ab cd</td>
</tr>
<tr>
<td><code>&quot;say \&quot;hi\&quot;&quot;</code></td>
<td>say &quot;hi&quot;</td>
</tr>
<tr>
<td><code>&quot;&#x4E2D;&#x6587;&quot;</code></td>
<td>&#x4E2D;&#x6587;</td>
</tr>
<tr>
<td><code>minecraft:stone</code></td>
<td><strong>&#x8FD9;&#x4F1A;&#x51FA;&#x9519;</strong></td>
</tr>
<tr>
<td><code>&quot;minecraft:stone&quot;</code></td>
<td>minecraft:stone</td>
</tr>
<tr>
<td><code>&quot;{\&quot;abcd\&quot;:\&quot;{\\\&quot;abc\\\&quot;:\\\&quot;&#x7B2C;&#x4E00;&#x884C;\\\\\\\\n&#x7B2C;&#x4E8C;&#x884C;\\\&quot;}\&quot;}&quot;</code></td>
<td>{&quot;abcd&quot;:&quot;{\&quot;abc\&quot;:\&quot;&#x7B2C;&#x4E00;&#x884C;\\n\&quot;}&quot;}</td>
</tr>
</tbody>
</table>
<blockquote>
<p><code>\n</code>&#x53CA;<code>\uxxxx</code>&#x7684;<code>\</code>&#x5B57;&#x7B26;&#x90FD;&#x9700;&#x8981;&#x8F6C;&#x4E49;&#xFF0C;&#x56E0;&#x4E3A;&#x8FD9;&#x4E24;&#x4E2A;&#x683C;&#x5F0F;&#x662F;JSON&#x7684;&#x800C;&#x4E0D;&#x662F;NBT&#x7684;&#x3002;</p>
<p>&#x6CE8;&#x610F;&#xFF0C;&#x90E8;&#x5206;NBT&#xFF0C;&#x5982;&#x5B9E;&#x4F53;ID&#xFF0C;&#x5728;&#x751F;&#x6210;&#x65F6;&#x5BB9;&#x8BB8;&#x4F7F;&#x7528;<code>id:&#x5B9E;&#x4F53;id</code>&#x7684;&#x65B9;&#x5F0F;&#x5199;&#xFF0C;&#x6BD4;&#x5982;&#x662F;<code>id:armor_stand</code><br>&#x7136;&#x800C;&#xFF0C;&#x68C0;&#x6D4B;&#x7684;&#x65F6;&#x5019;&#x662F;&#x5FC5;&#x987B;&#x5168;&#x5199;&#xFF0C;&#x4E5F;&#x5C31;&#x662F;&#x5B9E;&#x4F53;id&#x524D;&#x65B9;&#x5F97;&#x52A0;&#x4E0A;<code>minecraft:</code>&#xFF0C;&#x5982;<code>id:&quot;minecraft:armor_stand&quot;</code></p>
</blockquote>
<h2 id="&#x6570;&#x7EC4;&#x7C7B;&#x578B;">&#x6570;&#x7EC4;&#x7C7B;&#x578B;</h2>
<p>&#x6570;&#x7EC4;(Array)&#x7C7B;&#x578B;&#x80FD;&#x50A8;&#x5B58;&#x591A;&#x4E2A;&#x6570;&#x5B57;&#xFF0C;&#x90A3;&#x4E9B;&#x6570;&#x5B57;&#x5C31;&#x662F;&#x8BE5;&#x6570;&#x7EC4;&#x7684;&#x7C7B;&#x578B;&#x3002;<br>&#x548C;List&#x7C7B;&#x4F3C;&#xFF0C;&#x6211;&#x4EEC;&#x4F1A;&#x53EB;&#x7279;&#x5B9A;&#x7C7B;&#x578B;&#x7684;&#x6570;&#x7EC4;&#x4E3A; <strong>&lt;&#x7C7B;&#x578B;&gt;&#x6570;&#x7EC4;</strong>(array of &lt;&#x7C7B;&#x578B;&gt;)&#x3002;<br>&#x6570;&#x7EC4;&#x548C;List&#x6700;&#x5927;&#x7684;&#x5206;&#x522B;&#x5728;&#x4E8E;&#xFF0C;List&#x662F;&#x67E5;&#x770B;&#x5B50;&#x6807;&#x7B7E;&#x91CC;&#x662F;&#x5426;&#x5B58;&#x5728;&#x90A3;&#x4E9B;&#x68C0;&#x6D4B;&#x7684;&#x6807;&#x7B7E;&#xFF0C;&#x800C;&#x6570;&#x7EC4;&#x5219;&#x662F;&#x68C0;&#x67E5;<strong>&#x6574;&#x4E2A;&#x6570;&#x7EC4;</strong>&#x770B;&#x770B;&#x662F;&#x5426;&#x7B26;&#x5408;&#x6307;&#x5B9A;&#x8981;&#x6C42;&#xFF0C;&#x68C0;&#x67E5;&#x5305;&#x62EC;<strong>&#x8BE5;&#x6807;&#x7B7E;&#x6240;&#x5728;&#x4F4D;&#x7F6E;&#x3001;&#x987A;&#x5E8F;</strong>&#x7B49;&#x7B49;&#x3002;</p>
<p>&#x76EE;&#x524D;&#x652F;&#x6301;&#x7684;&#x7C7B;&#x578B;&#x5305;&#x62EC;&#xFF1A;</p>
<ul>
<li>Byte</li>
<li>Int</li>
<li>Long</li>
</ul>
<p>&#x683C;&#x5F0F;:</p>
<pre><code>[&#x7C7B;&#x578B;&#x524D;&#x7F00;;&#x5B50;&#x6807;&#x7B7E;]
</code></pre><p>&#x5B50;&#x6807;&#x7B7E;&#x548C;List&#x7C7B;&#x4F3C;&#xFF0C;&#x90FD;&#x662F;&#x53EA;&#x6709;&#x6570;&#x503C;&#x7684;&#x6807;&#x7B7E;&#xFF0C;&#x4E4B;&#x95F4;&#x4EE5;<code>,</code>&#x5206;&#x9694;</p>
<table>
<thead>
<tr>
<th>&#x7C7B;&#x578B;</th>
<th>&#x5B57;&#x7B26;&#xFF08;&#x5FC5;&#x987B;&#x5927;&#x5199;&#xFF09;</th>
</tr>
</thead>
<tbody>
<tr>
<td>Byte</td>
<td><code>B</code></td>
</tr>
<tr>
<td>Int</td>
<td><code>I</code></td>
</tr>
<tr>
<td>Long</td>
<td><code>L</code></td>
</tr>
</tbody>
</table>
<p>&#x4F8B;&#x5B50;:</p>
<pre><code>[I;]
&#x7A7A;&#x7684;Int array

[I;123,456]

[B;12b,13b,14b]

[L;123l,456l,789l]
</code></pre><blockquote>
<p>&#x53EA;&#x6709;&#x5F88;&#x5C11;&#x7684;&#x5730;&#x65B9;&#x9700;&#x8981;&#x7528;&#x5230;&#x6570;&#x7EC4;...</p>
</blockquote>

                                
                                </section>
                            
    </div>
    <div class="search-results">
        <div class="has-results">
            
            <h1 class="search-results-title"><span class='search-results-count'></span> results matching "<span class='search-query'></span>"</h1>
            <ul class="search-results-list"></ul>
            
        </div>
        <div class="no-results">
            
            <h1 class="search-results-title">No results matching "<span class='search-query'></span>"</h1>
            
        </div>
    </div>
</div>

                        </div>
                    </div>
                
            </div>

            
                
                <a href="nbt.html" class="navigation navigation-prev " aria-label="Previous page: 2.2 NBT及结构">
                    <i class="fa fa-angle-left"></i>
                </a>
                
                
                <a href="example.html" class="navigation navigation-next " aria-label="Next page: 2.2.2 NBT实战">
                    <i class="fa fa-angle-right"></i>
                </a>
                
            
        
    </div>

    <script>
        var gitbook = gitbook || [];
        gitbook.push(function() {
            gitbook.page.hasChanged({"page":{"title":"2.2.1 基本类型","level":"1.3.2.1","depth":3,"next":{"title":"2.2.2 NBT实战","level":"1.3.2.2","depth":3,"path":"common-format/nbt/example.md","ref":"common-format/nbt/example.md","articles":[]},"previous":{"title":"2.2 NBT及结构","level":"1.3.2","depth":2,"path":"common-format/nbt/nbt.md","ref":"common-format/nbt/nbt.md","articles":[{"title":"2.2.1 基本类型","level":"1.3.2.1","depth":3,"path":"common-format/nbt/simple.md","ref":"common-format/nbt/simple.md","articles":[]},{"title":"2.2.2 NBT实战","level":"1.3.2.2","depth":3,"path":"common-format/nbt/example.md","ref":"common-format/nbt/example.md","articles":[]}]},"dir":"ltr"},"config":{"plugins":["expandable-chapters","lb2br","-sharing"],"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"pluginsConfig":{"expandable-chapters":{},"lb2br":{},"highlight":{},"search":{},"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":false},"fontsettings":{"theme":"white","family":"sans","size":2},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false}},"theme":"default","pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"variables":{},"title":"命令进阶","language":"en","gitbook":"*","description":"一份Minecraft命令教程"},"file":{"path":"common-format/nbt/simple.md","mtime":"2017-07-27T08:56:14.125Z","type":"markdown"},"gitbook":{"version":"3.2.2","time":"2017-11-08T10:37:55.949Z"},"basePath":"../..","book":{"language":""}});
        });
    </script>
</div>

        
    <script src="../../gitbook/gitbook.js"></script>
    <script src="../../gitbook/theme.js"></script>
    
        
        <script src="../../gitbook/gitbook-plugin-expandable-chapters/expandable-chapters.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-search/search-engine.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-search/search.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-lunr/lunr.min.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-lunr/search-lunr.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-fontsettings/fontsettings.js"></script>
        
    

    </body>
</html>

